<!--
 * @Descripttion: 说明
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-04-25 12:11:55
 * @LastEditors: GW
 * @LastEditTime: 2021-09-26 09:55:11
-->
<template>
    <div class="form-group FormInputNumber" style="margin-bottom:0px;">
        <label :class="labelClass" :style="finalLabelStype"><span v-if="required" class="required ">*</span>{{ title }}：</label>
        <div :class="rightClass" :style="rightStyle">
            <form-pop :content="error" />
            <a-input-number style="width:100%;" v-bind="$props" @change="onChange" />
        </div>
    </div>
</template>

<script>
import { InputNumber } from 'ant-design-vue';
import formAttr from "@/mixins/form/form-attr";

const defaultLabelStype =
    "font-weight: normal;justify-content: flex-end;padding-left: 5px;text-align: right;width:110px;";
export default {
    name: "FormInputNumber",
    mixins: [formAttr],
    props: {
        ...InputNumber.props,
    },
    created() {
        console.log("inputNumber_props", this.$props)
    },
    computed: {
        finalLabelStype: function () {
            return this.labelStyle || defaultLabelStype;
        },
    },
    methods: {
        onChange(value) {
            console.log("整数组件——设值", value)
            this.$emit("input", value);
        }
    }
};
</script>
<style lang="less">
// .FormInputNumber{
//     .ant-input-number{
//         width: auto !important;
//     }
// }
</style>
